const http = require('http');  
const socketIo = require('socket.io');  
  
const server = http.createServer((req, res) => {  
  res.writeHead(200, { 'Content-Type': 'text/plain' });  
  res.end('Hello World!\n');  
});  
  
server.listen(3000, () => {  
  console.log('Server is running on port 3000');  
});  
  
const io = socketIo(server);